<form method="get" id="searchForm" class="formbody">
    <div id="usual1" class="usual">
        <?php if (isset($formItems)): ?>
        <ul class="seachform1">
        <?php foreach ($formItems as $item): ?>
            <?php if (is_array($item)):// 是数组的处理 ?>
            <?php if (!empty($item['type'])): ?>
	            <?php switch($item['type']):
	                case 'text'://input[type="text"],必含'label','name'字段 ?>
		            <li>
		                <label> <?php echo $item['label']; ?> </label>
		                <input type="text" name="<?php echo $item['name'] ?>" class="scinput1">
		            </li>
		            <?php break; ?>
		            <?php case 'checkbox'://input[type="checkbox"],必含'label','name','value','isChecked'  ?>
		            <li>
		                <label> &nbsp; </label>
		                <input type="checkbox" name="<?php echo $item['name'] ?>" value="<?php echo $item['value'] ?>" <?php echo empty($item['isChecked']) ? '' : 'checked' ; ?> >
		                <?php echo $item['label']; ?>
		            </li>
		            <?php break; ?>
		            <?php case 'dateRange'://时间范围,必含'label','begin','end'字段,begin及end字段必含name,value字段 ?>
		            <li>
		                <label> <?php echo $item['label']; ?> </label>
		                <input type="text" class="scinput1" name="<?php echo $item['begin']['name'] ?>" value="<?php echo $item['begin']['value']; ?>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/><i>&nbsp;-&nbsp;</i>
		                <input type="text" class="scinput1" name="<?php echo $item['end']['name'] ?>" value="<?php echo $item['end']['value']; ?>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
		            </li>
		            <?php break; ?>
	            <?php endswitch; ?>
            <?php endif; ?>
            <?php continue; ?>
            <?php endif;// END 数组处理 ?>
            <?php switch ($item) : // 字符串的处理
                case 'br': ?>
			        </ul>
			        <ul class="seachform1">
            <?php break; ?>
            <?php case 'school': ?>
	            <?php if (!empty($schoolList)): ?>
	            <li>
	                <label> 学校 </label>
	                <select name="schoolID" class="select">
	                    <option value="0">全部</option>
	                    <?php foreach ($schoolList as $v): ?>
	                    <option value="<?php echo $v['id']; ?>">
	                        <?php echo $v['name']; ?>
	                    </option>
	                    <?php endforeach; ?>
	                </select>
	            </li>
	            <?php endif; ?>
            <?php break; ?>
            <?php case 'tradeState': ?>
	            <?php if (!empty($tradeStateCnList)): ?>
	            <li>
	                <label> 订单状态 </label>
	                <select name="tradeState" class="select">
	                    <option value="ALL">全部</option>
	                    <?php foreach ($tradeStateCnList as $k => $v): ?>
	                    <option value="<?php echo $k; ?>">
	                        <?php echo $v; ?>
	                    </option>
	                    <?php endforeach; ?>
	                </select>
	            </li>
	            <?php endif; ?>
            <?php break; ?>
            <?php endswitch;// END 字符串处理 ?>
        <?php endforeach; ?>
        </ul>

        <ul class="seachform1">
            <li class="sarchbtn">
                <label>
                    &nbsp;
                </label>
                <input name="" id="searchBtn" type="submit" class="scbtn" value="查询" />
                <input name="" id="resetBtn" type="reset" class="scbtn1" value="重置" />
            </li>
        </ul>
        <?php endif; ?>
        <?php if(!empty($downExcel)) : ?>
        <ul class="seachform1 btnbar">
            <li>
              <a id="downExcelBtn" type="button" id="downExcelBtn" class="ibtn" target="_black" onclick="this.href=location.href+(location.href.indexOf('?')>=0 ? '&' : '?') +'downExcel=1';">导出Excel</a> 
            </li>
        </ul>
        <?php endif;?>
        
    </div>
</form>

